#pragma once

#include <windows.h>

class WindowMetrics;
class TextMetrics;
class Text;
class ScrollBar
{
public:
	void SetHScroll();
	void SetVScroll();
	void RemoveHScroll();
	void RemoveVScroll();
	void UpdateScrollInfo();
	void OnHScroll(UINT code);
	void OnVScroll(UINT code);

public:
	int GetXPos();
	int GetYPos();
	int GetYMax();
	void SetXPos(int x);
	void SetYPos(int y);

public:
	void Init(HWND hWnd, WindowMetrics* wm, Text* text, TextMetrics* tm);

	ScrollBar(void);
	~ScrollBar(void);
private:
	int xPos, xMax;
	int yPos, yMax;
	bool hide_caret;

	HWND hWnd;
	WindowMetrics* wm;
	TextMetrics* tm;
	Text* text;
private:
	void RedrawNonClientArea(DWORD dwStyle);
};
